let log = document.querySelector(".input-sub")
let username = document.querySelector(".input-id")
let password = document.querySelector(".input-psd")
console.log(username, password);
log.onclick = function () {
    $.ajax({
        url: `http://jx.xuzhixiang.top/ap/api/login.php?username=${$(username).val()}&password=${$(password).val()}`,
        type: "get",
        success: function (data) {
            console.log(data);
            if (data.code) {
                alert("登录成功")
                location.href = "index.html"
                localStorage.setItem("username", $("#phoneNum").val());
            } else {
                alert("请您核对后再次输入！")
            }
        }
    })
}